@echo off

set lib=ThisILove
set src=..\PlayNexus\Web
set dst=..\PlayNexus\Web\spaces\storyboard
set new=.\

set xd=/XD bk db pg md cs sc backup bin obj pages spaces creator dataNSB App_Data
set xf=/XF *.null merge.css *.src.css
set files=*.js *.html *.txt *.gif *.jpg *.png *.php *.css
set newfiles=%lib%*.js Theme*.js Test*.js
set opt=/S

:: The main deploy
robocopy %src% %dst% %files% %opt% /PURGE %xd% %xf%

:: Copy admin page
robocopy %src%\App\pg\gigs\admin %dst%\App\pg\gigs\admin %files% %opt% /PURGE %xd% %xf%

:: Copy default theme
robocopy %src%\Scripts\Scripts %dst%\App\sc Theme*.js %opt%

:: Copy PlaySpace javascript libraries
robocopy %new%\Scripts %dst%\App\sc %newfiles% %opt%

:: Copy data
if exist %new%\App robocopy %new%\App %dst%\App %files% %opt% %xf%

:: Copy test cases
if exist %new%\Tests\Scripts robocopy %new%\Tests\Scripts %dst%\App\sc Test*.js %opt%

:: Copy PlaySpace build scripts and css
:: robocopy %new% %dst% *.php

REM robocopy %new%\Theme\Scripts %dst%\Scripts\Scripts Theme*.js %opt%
exit 0

